package c.h.a;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import b.u.a.a;
import c.h.a.j0.h0;
import c.h.a.j0.u0.b;
import com.liuzh.deviceinfo.MainActivity;
import java.util.List;
import java.util.Objects;

/* compiled from: lambda */
public final /* synthetic */ class d implements OnClickListener {
    public final /* synthetic */ MainActivity a;
    public final /* synthetic */ List b;

    public /* synthetic */ d(MainActivity mainActivity, List list) {
        this.a = mainActivity;
        this.b = list;
    }

    public final void onClick(DialogInterface dialogInterface, int i) {
        MainActivity mainActivity = this.a;
        List list = this.b;
        Objects.requireNonNull(mainActivity);
        dialogInterface.dismiss();
        try {
            mainActivity.s.add((h0) ((b) list.get(i)).a.newInstance());
            a adapter = mainActivity.q.getAdapter();
            if (adapter != null) {
                adapter.h();
            }
            mainActivity.q.v(mainActivity.s.size() - 1, true);
            mainActivity.E();
        } catch (IllegalAccessException | InstantiationException unused) {
        }
    }
}
